oxenstored: don't wake to issue no conflict-credit
authorThomas Sanders <thomas.sanders@citrix.com>
Fri, 24 Mar 2017 19:55:03 +0000 (19:55 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 28 Mar 2017 12:07:04 +0000 (13:07 +0100)
commit4bcfc6881e9e2e58a29e9dcbcc16b67aff8e9f88
treedeafc90b357b219c025dff9f3bc4e0fb5afea6df
parentb2a4105820807beb85cfeeaf2dc3c8bb93cc6d0c
oxenstored: don't wake to issue no conflict-credit

In the main loop, when choosing the timeout for the select function
call, we were setting it so as to wake up to issue conflict-credit to
any domains that could accept it. When xenstore is idle, this would
mean waking up every 50ms (by default) to do no work. With this
commit, we check whether any domain is below its cap, and if not then
we set the timeout for longer (the same timeout as before the
conflict-protection feature was added).

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
Reviewed-by: Jonathan Davies <jonathan.davies@citrix.com>
tools/ocaml/xenstored/domains.ml
tools/ocaml/xenstored/xenstored.ml